package com.chance.cc.crawler.development.command.publish.ifeng;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.development.command.job.domain.ifeng.health.realtime.IFengHealthRealtimeCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.job.domain.ifeng.health.trace.IFengHealthTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.script.ifeng.IFengPublishCrawlerScript;
import com.chance.cc.crawler.development.command.trigger.domain.ifeng.IFengCrawlerTriggerInfo;
import org.junit.Test;

/**
 * @author lt
 * @version 1.0
 * @date 2021-02-09 23:20:58
 * @email okprog@sina.com
 */
public class IFengPublishCrawlerJob {
    /**
     * 网易测试发布
     */
    @Test
    public void publishTestCrawlerJob(){
        CrawlerJob crawlerJob = IFengHealthTraceCrawlerSchedulerJob.publishCrawlerScheduleJobInfo();
        IFengCrawlerTriggerInfo.publishIFengTestCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(), crawlerJob.generateCrawlerTriggerKey());
        IFengPublishCrawlerScript.publishCrawlerNodeScript();
    }

    /**
     * 网易健康资讯发布任务
     */
    @Test
    public void publishIFengHealthRealtimeJob(){
        CrawlerJob crawlerJob = IFengHealthRealtimeCrawlerSchedulerJob.publishCrawlerScheduleJobInfo();
        IFengCrawlerTriggerInfo.publishIFengHealthCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }

    /**
     * 网易健康资讯回溯发布任务
     */
    @Test
    public void publishIFengHealthTraceJob(){
        CrawlerJob crawlerJob = IFengHealthTraceCrawlerSchedulerJob.publishCrawlerScheduleJobInfo();
        IFengCrawlerTriggerInfo.publishIFengHealthTraceCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }
}
